package com.jcl.traffic.security.repository;

import com.jcl.traffic.security.model.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * @author jcl_hqu
 * @date 2020/11/22 10:46
 */

@Repository
public interface UserRepository extends JpaRepository<User, Long> {
    @Query(value = "select u.* from user u where u.username=?1",nativeQuery = true)
    User findByUsername( String username );
}
